//
//  LJYTempController.swift
//  新浪微博
//
//  Created by 李俊扬 on 2017/6/29.
//  Copyright © 2017年 李俊扬. All rights reserved.
//

import UIKit

class LJYTempController: UIViewController {

    override func viewDidLoad() {
        super.viewDidLoad()
        setupUI()
    }
    
    private func setupUI() {
     view.backgroundColor = UIColor.white
        setupNav()
    }
    
    private func setupNav() {
        
        navigationItem.title = "第\(navigationController?.childViewControllers.count ?? 0)个控制器"
        // 右侧
        navigationItem.rightBarButtonItem = UIBarButtonItem(imgName: nil, title: "PUSH", target: self, action: #selector(pushClick))
    }
    // 监听方法
    @objc private func pushClick() {
        
        let tempVC = LJYTempController()
        
        navigationController?.pushViewController(tempVC, animated: true)
    }
}
